#include "rt_images.h"

#include <QScreen>
#include <QGuiApplication>

RTImagesWidget::RTImagesWidget(QWidget *parent):QWidget(parent)
{
    m_screen = QGuiApplication::primaryScreen();
    QSize size = m_screen->size();
    qDebug() << "size: " << size.width() << ", height: " << size.height();

    this->setFixedSize(size.width(), size.height());

    m_layout = new QVBoxLayout(parent);
    m_layout->setAlignment(Qt::AlignCenter);
    m_layout->setContentsMargins(10, 10, 10, 50);

    m_truth = new QLabel();
    m_truth->setStyleSheet("background-color: rgb(0, 0, 0);");
    m_truth->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    m_layout->addWidget(m_truth, 0);

    m_result = new QLabel();
    m_result->setStyleSheet("background-color: rgb(0, 0, 0);");
    m_result->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    m_layout->addWidget(m_result, 1);

    m_layout->setStretch(0, 4);
    m_layout->setStretch(1, 4);

    qDebug() << "RTImagesWidget size: " << this->size();

    this->setLayout(m_layout);
}

RTImagesWidget::~RTImagesWidget()
{
    delete m_result;
    delete m_truth;
    delete m_screen;
    delete m_layout;
}
